Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Iterate over coordinates in any GeoJSON object, similar to Array.forEach.
Parameters
layer
Object any GeoJSON objectcallback
Function a method that takes (value)excludeWrapCoord
[boolean] whether or not to include
the final coordinate of LinearRings that wraps the ring in its iteration.Examples
var point = { type: 'Point', coordinates: [0, 0] };
coordEach(point, function(coords) {
// coords is equal to [0, 0]
});
Reduce coordinates in any GeoJSON object into a single value, similar to how Array.reduce works. However, in this case we lazily run the reduction, so an array of all coordinates is unnecessary.
Parameters
layer
Object any GeoJSON objectcallback
Function a method that takes (memo, value) and returns
a new memomemo
Any the starting value of memo: can be any type.excludeWrapCoord
[boolean] whether or not to include
the final coordinate of LinearRings that wraps the ring in its iteration.Returns Any combined value
Iterate over property objects in any GeoJSON object, similar to Array.forEach.
Parameters
Examples
var point = { type: 'Feature', geometry: null, properties: { foo: 1 } };
propEach(point, function(props) {
// props is equal to { foo: 1}
});
Reduce properties in any GeoJSON object into a single value, similar to how Array.reduce works. However, in this case we lazily run the reduction, so an array of all properties is unnecessary.
Parameters
layer
Object any GeoJSON objectcallback
Function a method that takes (memo, coord) and returns
a new memomemo
Any the starting value of memo: can be any type.Returns Any combined value
Iterate over features in any GeoJSON object, similar to Array.forEach.
Parameters
Examples
var feature = { type: 'Feature', geometry: null, properties: {} };
featureEach(feature, function(feature) {
// feature == feature
});
Get all coordinates from any GeoJSON object, returning an array of coordinate arrays.
Parameters
layer
Object any GeoJSON objectReturns Array<Array<Number>> coordinate position array
This module is part of the Turfjs project, an open source module collection dedicated to geographic algorithms. It is maintained in the Turfjs/turf repository, where you can create PRs and issues.
Install this module individually:
$ npm install turf-meta
Or install the Turf module that includes it as a function:
$ npm install turf
FAQs
meta and functional programming helpers for turf modules
The npm package turf-meta receives a total of 15,622 weekly downloads. As such, turf-meta popularity was classified as popular.
We found that turf-meta demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.